package Scrap;

public class demo10_recursion_factorial {
	
public static void main(String[] args) {
	
	long fact=factorial(5);
	System.out.println(fact);
	
	
}		


private static long factorial(int n)
{
    if (n == 1)
        return 1;
    else
        return n * factorial(n-1);
}


}
